package cn.zn.user.entity;

import cn.zn.base.bean.entity.BaseEntity;
import cn.zn.role.entity.SysRole;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;
import java.util.List;

/**
 * 用户对象 sys_user
 *
 * @author zn-admin
 */
@TableName("sys_user")
public class SysUser extends BaseEntity<SysUser> {

    private String loginName; // 用户账号

    private String userName; // 用户姓名

    @JsonIgnore
    private String password; // 密码

    private String mobile; // 电话

    private String email; // 用户邮箱

    private String sex; // 用户性别（1男 2女 3未知）

    private String sexName; // 用户性别

    private String orgId; // 所属组织

    private String orgCode; // 组织编码

    private String orgName; // 组织名称

    private String deptId; // 所属部门

    private String deptCode; // 部门编码

    private String deptName; // 部门名称

    private String postId; // 岗位

    private String postCode; // 岗位

    private String postName; // 岗位

    private String jobCode; // 职务

    private String jobName; // 职务

    private String corp; // 产业

    private String corpId;

    private String status; // 帐号状态（y正常 n停用）

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ts; // nc更新时间

    /**
     * 角色对象
     */
    @TableField(exist = false)
    private List<SysRole> roles;

    /**
     * 兼职部门
     */
    @TableField(exist = false)
    private List<String> jzOrgIds;

    /**
     * 兼职法人
     */
    @TableField(exist = false)
    private List<String> frOrgIds;

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSexName() {
        return sexName;
    }

    public void setSexName(String sexName) {
        this.sexName = sexName;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptCode() {
        return deptCode;
    }

    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    public String getJobCode() {
        return jobCode;
    }

    public void setJobCode(String jobCode) {
        this.jobCode = jobCode;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getCorp() {
        return corp;
    }

    public void setCorp(String corp) {
        this.corp = corp;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    public List<SysRole> getRoles() {
        return roles;
    }

    public void setRoles(List<SysRole> roles) {
        this.roles = roles;
    }

    public List<String> getJzOrgIds() {
        return jzOrgIds;
    }

    public void setJzOrgIds(List<String> jzOrgIds) {
        this.jzOrgIds = jzOrgIds;
    }

    public List<String> getFrOrgIds() {
        return frOrgIds;
    }

    public void setFrOrgIds(List<String> frOrgIds) {
        this.frOrgIds = frOrgIds;
    }

    public String getCorpId() {
        return corpId;
    }

    public void setCorpId(String corpId) {
        this.corpId = corpId;
    }
}
